package com.zhaopin.file;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Sort {
    public static void main(String[] args) {
        String s = "config-position_search-position_score-ANONYMOUS-c_Pc_s_anon_rpc_v8\n" +
                "config-position_search-position_mbscore-default-c_APP_lambdaMart_ctr_v1.8.0_reply_v1.1_0510\n" +
                "config-position_search-position_mbscore-ANONYMOUS-limitsize\n" +
                "config-position_search-position_score-default-c_PC_lambdaMart_label_v1.2_adjuster\n" +
                "config-position_search-position_mbscore-COMPANY-c_app_ctr_v2.5_like_v1.5-zml-20220329\n" +
                "config-position_search-position_mbscore-REPLENCOM-c_app_whole_country-zml-20220421\n" +
                "config-position_search-position_mbscore-default-c_APP_desire_jobtype_v2.0\n" +
                "config-position_search-position_mbscore-default-c_APP_desire_jobtype_v1.0\n" +
                "config-position_search-position_mbscore-default-c_APP_lambdaMart_fraud_downgrading_v1.0\n" +
                "config-position_search-position_mbscore-default-c_APP_lambdaMart_ctr_v1.8.1_reply_v1.1_0531\n" +
                "config-position_search-position_mbscore-default-c_APP_lambdaMart_ctr_v1.8.0_reply_v1.4.1_sigmoid_0525\n" +
                "config-position_search-position_mbscore-default-c_APP_lambdaMart_ctr_v1.8.2_reply_v1.1_0531\n" +
                "config-position_search-position_mbscore-COMPANY-c_app_ctr_v2.5_like_v2.0-zml-20220531\n" +
                "config-position_search-position_mbscore-COMPANY-c_app_ctr_v2.5_like_v2.1-zml-20220531\n" +
                "config-position_search-position_mbscore-COMPANY-c_app_ctr_v2.5_like_v1.5-zml-20220531\n" +
                "config-position_search-position_mbscore-NOINTENT-c_app_reduce_black\n" +
                "config-position_search-position_score-COMPANY-c_app_fixParamEmpty_v1_reduce_black\n" +
                "config-position_search-position_mbscore-default-c_APP_delete_secondSort_v1.0\n" +
                "config-position_search-position_mbscore-default-c_APP_delete_secondSort_areaRules_v2.0\n" +
                "config-position_search-position_mbscore-COMPANY-c_app_ctr_v2.5_like_v1.5-zml-20220606\n" +
                "config-position_search-position_mbscore-MIXINTENT-c_app_combine_v1-zml-20220523\n" +
                "config-position_search-position_score-NOINTENT-reduce_black\n" +
                "config-position_search-position_score-default-c_PC_lambdaMart_ctr_v1.8.0_reply_v1.1_0607";
        String s2 = "docker-b config-position_search-position_score-default-c_PC_lambdaMart_label_v1.2_adjuster\n" +
                "    6.87    5.90    5.64\n" +
                "docker-b config-position_search-position_score-ANONYMOUS-c_Pc_s_anon_rpc_v8\n" +
                "    8.84    5.54    4.78\n" +
                "docker-b config-position_search-position_score-COMPANY-c_app_fixParamEmpty_v1_reduce_black\n" +
                "    1.73    1.16    0.933\n" +
                "docker-b config-position_search-position_score-NOINTENT-reduce_black";
        List<String> collect = Arrays.stream(s.split("\n")).sorted().collect(Collectors.toList());

        List<String> collect2 = Arrays.stream(s2.split("\n")).sorted().collect(Collectors.toList());
        for (String s22 : collect2) {
            if(s22.startsWith("docker-b")){
                String s222 = s22.split(" ")[1];
                for (String s1 : collect) {
                    if(s1.equals(s222)){
                        System.out.println(s1);
                    }
                }
            }
        }

    }
}
